package com.example.blog.service;

import com.example.blog.mapper.UserMapper;
import com.example.blog.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: userService
 * @author: chengbaiyi
 * @create: 2022-08-19 19:32
 */
@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public int reg(String username, String nickname, String password) {
        return userMapper.reg(username, nickname, password);
    }

    public UserInfo sole(String username) {
        return userMapper.sole(username);
    }

    public UserInfo getAuthor(Integer uid) {
        return userMapper.getAuthor(uid);
    }
}
